﻿/*------------------------------------------------
// File Description: Inbound DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-05-04 14:43:29
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 入库单
    /// </summary>
    [Table(nameof(Inbound))]
    public class Inbound : BaseEntity
    {
        private string _inboundNo = string.Empty;
        private string _warehouseName = string.Empty;
        private string _warehouseCode;
        private string _areaCode;
        private string _areaName;
        private string _location;
        private string _inboundTypeNo;

        #region Public Property

        ///<Summary>
        /// 入库类型
        ///</Summary>
        public Enum.InboundType InboundType { get; set; }

        ///<Summary>
        /// 入库类型单号
        ///</Summary>
        public string InboundTypeNo
        {
            get { return string.IsNullOrWhiteSpace(_inboundTypeNo) ? string.Empty : _inboundTypeNo; }
            set { _inboundTypeNo = value; }
        }

        ///<Summary>
        /// 入库单号
        ///</Summary>
        public string InboundNo
        {
            get { return string.IsNullOrWhiteSpace(_inboundNo) ? string.Empty : _inboundNo; }
            set { _inboundNo = value; }
        }

        ///<Summary>
        /// 仓库代码
        ///</Summary>
        public string WarehouseCode
        {
            get { return string.IsNullOrWhiteSpace(_warehouseCode) ? string.Empty : _warehouseCode; }
            set { _warehouseCode = value; }
        }

        ///<Summary>
        /// 仓库名称
        ///</Summary>
        public string WarehouseName
        {
            get { return string.IsNullOrWhiteSpace(_warehouseName) ? string.Empty : _warehouseName; }
            set { _warehouseName = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 入库单
        /// </summary>
        public virtual DbSet<Inbound> Inbounds { get; set; }
    }
}